home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / jam / jamdisk7 / inc9110b.lzh / include / sys / fcntl.h next >
C/C++ Source or Header  |  1991-07-14  |  2KB  |  65 lines

  1. /*
  2.  * Libraries and headers for PDC release 3.3 (C) 1989 Lionel Hummel.
  3.  * PDC Software Distribution (C) 1989 Lionel Hummel and Paul Petersen.
  4.  * PDC I/O Library (C) 1987 by J.A. Lydiatt.
  5.  *
  6.  * This code is freely redistributable upon the conditions that this 
  7.  * notice remains intact and that modified versions of this file not
  8.  * be included as part of the PDC Software Distribution without the
  9.  * express consent of the copyright holders.  No warrantee of any
  10.  * kind is provided with this code.  For further information, contact:
  11.  *
  12.  *  PDC Software Distribution    Internet:                     BIX:
  13.  *  P.O. Box 4006             or hummel@cs.uiuc.edu            lhummel
  14.  *  Urbana, IL  61801-8801       petersen@uicsrd.csrd.uiuc.edu
  15.  */
  16.  
  17. /*
  18.  *  fcntl.h
  19.  *
  20.  *  Structures and symbolic constants used by PDC to manage file I/O.
  21.  */
  22.  
  23. /*
  24.  * 14.7.91 sjw; mods to allow dup(), dup2() implementation.  _devtab[]
  25.  *              now points to an array of _devices rather than being one.
  26.  *              I've included the two declarations here to make sure the
  27.  *              correct interpretation is being used.  Also, ensure
  28.  *              only effective once.
  29.  */
  30.  
  31. #ifndef __FCNTL_H__
  32. #define __FCNTL_H__
  33.  
  34. #define O_RDONLY    0x0000
  35. #define O_WRONLY    0x0001
  36. #define O_RDWR        0x0002
  37. #define O_CREAT        0x0100
  38. #define O_TRUNC        0x0200
  39. #define O_EXCL        0x0400
  40. #define O_APPEND    0x0800
  41. #define O_STDIO        0x1000
  42.  
  43. #define _DO_FSTAT
  44.  
  45. struct _device {
  46.     long    _useCount;    /* Number of users of this descriptor   */
  47.     long    _fileHandle;    /* Actually, a (struct FileHandle *)    */
  48.     long    _mode;        /* The mode flags of this device    */
  49. #ifdef _DO_FSTAT
  50.     long        _lock;        /* Lock when reading (for fstat)        */
  51. #endif
  52. };
  53.  
  54. extern struct _device *_devtab[];
  55. extern struct _device __devtab[];
  56.  
  57. #define OPEN_MAX    20
  58. extern short _numdev;    /* may not be the same as OPEN_MAX */
  59.  
  60. #define DEF_PMODE 0666L
  61.  
  62. #endif /* __FCNTL_H__ */
  63.  
  64.  
  65.